def message_processors(request):
    ret = {}
    if not request.user.is_authenticated() and request.session.get('anonymous_user_messages', []):
        ret['messages'] = [x for x in request.session.get('anonymous_user_messages', [])]
        request.session['anonymous_user_messages'] = []

    return ret

def defaults(request):
    from django.conf import settings
    return {'top_menu' : request.session.get('top_menu',''),
            'session_cookie_name': settings.SESSION_COOKIE_NAME,
            'session_cookie_value': request.COOKIES.get(settings.SESSION_COOKIE_NAME,'')}